<template>

    <div class="father">
        <!-- 传参写法一致 -->
        <Child :lxyMoney="money" :lxyHouse="house"
        v-bind="{lxyCar:car,lxyBelle:belle}" :GetGrandSonFun="GetGrandSon"/>
    </div>
</template>
<script setup   lang="ts">
import {ref} from 'vue'
import Child from '@/pages/_$attrs/Child.vue';

let money = ref(1000000);
let house = ref("别墅");
let car = ref("宝马");
let belle = ref("美女");

//孙传递祖父，祖父准备方法
function GetGrandSon(num:number){
    money.value += num;
}
</script>
<style scoped>
.father{
    padding: 50px;
    width: 50vw;
    height: 60vh;
    background-color: rgb(52, 146, 34);
}
</style>
